@import "framework/variables";
@import 'framework/tw_bootstrap_variables';
@import "bootstrap/variables";

header.navbar-gitlab-new {
  color: $white-light;
  background-color: $purple-900;
  border-bottom: 0;

  .header-content {
    padding-left: 0;

    .title-container {
      align-items: stretch;
      padding-top: 0;
      overflow: visible;
    }

    .title {
      display: flex;
      padding-right: 0;
      color: currentColor;

      > a {
        display: flex;
        align-items: center;
        padding-top: 3px;
        padding-right: $gl-padding;
        padding-left: $gl-padding;
        margin-left: -$gl-padding;
        border-bottom: 3px solid transparent;

        @media (min-width: $screen-sm-min) {
          padding-right: $gl-padding;
          padding-left: $gl-padding;
        }

        svg {
          margin-top: -3px;

          @media (min-width: $screen-sm-min) {
            margin-right: 10px;
          }
        }

        &:hover,
        &:focus {
          color: currentColor;
          text-decoration: none;
          border-bottom-color: $white-light;
        }
      }
    }

    .dropdown.open {
      > a {
        border-bottom-color: $white-light;
      }
    }

    .dropdown-menu {
      margin-top: 4px;
      min-width: 130px;

      @media (max-width: $screen-xs-max) {
        left: auto;
        right: 0;
      }
    }
  }

  .navbar-collapse {
    padding-left: 0;
    color: $white-light;
    box-shadow: 0;

    @media (max-width: $screen-xs-max) {
      margin-left: -$gl-padding;
      margin-right: -10px;
    }

    .dropdown-bold-header {
      color: initial;
    }

    .nav {
      > li:not(.hidden-xs) a {
        @media (max-width: $screen-xs-max) {
          margin-left: 0;
          min-width: 100%;
        }
      }
    }
  }

  .container-fluid {
    .navbar-toggle {
      min-width: 45px;
      padding: 6px $gl-padding;
      margin-right: -7px;
      font-size: 14px;
      text-align: center;
      color: currentColor;
      border-left: 1px solid lighten($purple-700, 10%);

      &:hover,
      &:focus,
      &.active {
        color: currentColor;
        background-color: transparent;
      }
    }

    .navbar-nav {
      @media (max-width: $screen-xs-max) {
        display: flex;
        padding-right: 10px;
      }

      li {
        .badge {
          box-shadow: none;
        }
      }
    }

    .nav > li {
      &.header-user {
        @media (max-width: $screen-xs-max) {
          padding-left: 10px;
        }
      }

      > a {
        background: none;
        opacity: .9;
        will-change: opacity;

        &.header-user-dropdown-toggle {
          .header-user-avatar {
            border-color: $white-light;
          }
        }

        &:hover,
        &:focus {
          color: $white-light;
          opacity: 1;

          > svg {
            fill: $white-light;
          }

          &.header-user-dropdown-toggle {
            .header-user-avatar {
              border-color: $white-light;
            }
          }
        }
      }
    }
  }
}

.navbar-sub-nav {
  display: flex;
  margin-bottom: 0;
  color: $white-light;

  > li {
    &.active > a,
    a:hover,
    a:focus {
      border-bottom-color: $white-light;
      text-decoration: none;
      outline: 0;
      opacity: 1;
    }

    > a {
      display: block;
      padding: 16px 10px 13px;
      font-size: 13px;
      color: currentColor;
      border-bottom: 3px solid transparent;
      opacity: .9;
      will-change: opacity;

      @media (min-width: $screen-sm-min) {
        padding: 15px $gl-padding 12px;
        font-size: 14px;
      }
    }
  }

  .dropdown-chevron {
    position: relative;
    top: -1px;
    font-size: 10px;
  }
}

.header-user .dropdown-menu-nav,
.header-new .dropdown-menu-nav {
  margin-top: 4px;
}

.search {
  form {
    border-color: $purple-800;

    &:hover {
      border-color: rgba($white-light, .6);
      box-shadow: none;
    }
  }

  &.search-active form {
    border-color: $white-light;
  }

  form,
  .search-input {
    background-color: $purple-700;
  }

  .search-input {
    color: $white-light;
  }

  .search-input::placeholder {
    color: rgba($white-light, .6);
  }

  .location-badge {
    font-size: 12px;
    color: rgba($white-light, .6);
    background-color: $purple-800;
    transition: color 0.15s;
    will-change: color;
  }

  .search-input-wrap {
    .search-icon,
    .clear-icon {
      color: rgba($white-light, .6);
    }
  }

  &.search-active {
    .location-badge {
      color: $white-light;
      background-color: $purple-800;
    }

    .search-input-wrap {
      .search-icon {
        color: rgba($white-light, .6);
      }

      .clear-icon {
        color: $white-light;
      }
    }
  }
}

.breadcrumbs {
  display: flex;
  min-height: 60px;
  padding-top: $gl-padding-top;
  padding-bottom: $gl-padding-top;
  color: $gl-text-color;
  border-bottom: 1px solid $border-color;

  .dropdown-toggle-caret {
    position: relative;
    top: -1px;
    padding: 0 5px;
    color: rgba($black, .65);
    font-size: 10px;
    line-height: 1;
    background: none;
    border: 0;

    &:focus {
      outline: 0;
    }
  }
}

.breadcrumbs-container {
  display: flex;
  width: 100%;
  position: relative;

  .dropdown-menu-projects {
    margin-top: -$gl-padding;
    margin-left: $gl-padding;
  }
}

.breadcrumbs-links {
  flex: 1;
  align-self: center;
  color: $black-transparent;

  a {
    color: rgba($black, .65);

    &:not(:first-child),
    &.group-path {
      margin-left: 4px;
    }

    &:not(:last-of-type),
    &.group-path {
      margin-right: 3px;
    }
  }

  .title {
    white-space: nowrap;

    > a {
      &:last-of-type {
        font-weight: 600;
      }
    }
  }

  .avatar-tile {
    margin-right: 5px;
    border: 1px solid $border-color;
    border-radius: 50%;
    vertical-align: sub;

    &.identicon {
      float: left;
      width: 16px;
      height: 16px;
      margin-top: 2px;
      font-size: 10px;
    }
  }

  .text-expander {
    margin-left: 4px;
    margin-right: 4px;

    > i {
      position: relative;
      top: 1px;
    }
  }
}

.breadcrumbs-extra {
  flex: 0 0 auto;
  margin-left: auto;
}

.breadcrumbs-sub-title {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: normal;

  ul {
    margin: 0;
  }

  li {
    display: inline-block;

    &:not(:last-child) {
      &::after {
        content: "/";
        margin: 0 2px 0 5px;
      }
    }

    &:last-child a {
      font-weight: 600;
    }
  }

  a {
    color: $gl-text-color;
  }
}
